package com.youpingou.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

@TableName(value = "tb_order_good")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class OrderGoods{
    @TableId(type = IdType.AUTO)
    private Integer id;
    //订单编号
    @TableField(value="sn")
    private String sn;
    @TableField(exist = false)
    private Order order;


    @TableField(value="sku_id")
    @JsonProperty("sku_id")
    private Integer skuId;
    @TableField(exist = false)
    private Sku sku;
    //购买数量
    @TableField(value="number")
    private Integer number;
    //规格信息
    @TableField(value="spec_list")
    @JsonProperty("spec_list")
    private String specList;
    @TableField(value="sku_name")
    @JsonProperty("sku_name")
    private String skuName;
    //图片地址
    @TableField(value="logo")
    private String logo;
    //商品单价
    @TableField(value="price")
    private Double price;
}